
Pod::Spec.new do |s|
  # 名称，pod search搜索的关键词,注意这里一定要和pod spec create YXImageBrowser中的名称一样,否则报错
  s.name         = "YXImageBrowser"
  # 版本号
  s.version      = "1.0.3"
  # 库文件的简介
  s.summary      = "iOS image browser / iOS 图片浏览器"
  # 描述
  s.description  = <<-DESC
            iOS 图片浏览器，功能强大，易于拓展，极致的性能优化和严格的内存控制让其运行更加的流畅和稳健。
                   DESC
  # 项目主页地址          
  s.homepage     = "https://gitee.com/Yanqf/YXImageBrowser.git"
  # "MIT" 固定写法
  s.license      = "MIT" 
  # 作者-邮箱
  s.author       = { "yqf" => "176036417@qq.com" }
  # iOS 最低支持版本
  s.platform     = :ios, "9.0"
  # 项目地址
  s.source       = { :git => "https://gitee.com/Yanqf/YXImageBrowser.git", :tag => "#{s.version}" }
  # 是否需要ARC自动管理内存
  s.requires_arc = true

  s.default_subspec = "Core"

  # 针对依赖库
  s.subspec "Core" do |core|
    # 不能直接匹配根目录下所有文件，直接匹配会把AppDelegate、Main.storyboard都引入，
    # 匹配单个文件
    # 引用多个用逗号隔开
    core.source_files   = "YXImageBrowser/**/*.{h,m}"
    #资源文件
    core.resources      = "YXImageBrowser/YXImageBrowser.bundle"
    # 依赖库，不能依赖未发布的库 多依赖库不是用逗号隔开 like this →
    core.dependency 'YYImage'
    core.dependency 'SDWebImage', '>= 5.0.0'
  end
  s.subspec "NOSD" do |core|
    core.source_files   = "YXImageBrowser/**/*.{h,m}"
    core.exclude_files  = "YXImageBrowser/WebImageMediator/YXDefaultWebImageMediator.{h,m}"
    core.resources      = "YXImageBrowser/YXImageBrowser.bundle"
    core.dependency 'YYImage'
  end

  s.subspec "Video" do |video|
    video.source_files = "Video/*.{h,m}"
    video.resources    = "Video/YXImageBrowserVideo.bundle"
    video.dependency 'YXImageBrowser/Core'
  end
  s.subspec "VideoNOSD" do |video|
    video.source_files = "Video/*.{h,m}"
    video.resources    = "Video/YXImageBrowserVideo.bundle"
    video.dependency 'YXImageBrowser/NOSD'
  end

end
